


export const selectComponents = [
  {
    label: '单选',
    showLabel: true,
    orgTag: 'el-radio-group',
    tag: 'my-radio-group',
    tagIcon: 'radio',
    defaultValue: undefined,
    span: 24,
    labelWidth: null,
    style: {},
    optionType: 'default',
    border: false,
    disabled: false,
    required: true,
    options: [{
      label: '选项一',
      value: '选项一'
    }, {
      label: '选项二',
      value: '选项二'
    }],
    regList: [],
    changeTag: true,
    proCondition: true
  },
  {
    label: '多选',
    showLabel: true,
    orgTag: 'el-checkbox-group',
    tag: 'my-checkbox-group',
    tagIcon: 'checkbox',
    dataType: 'checkbox',
    defaultValue: undefined,
    span: 24,
    labelWidth: null,
    style: {},
    optionType: 'default',
    border: false,
    disabled: false,
    required: true,
    multiple:true,
    options: [{
      label: '选项一',
      value: '选项一'
    }, {
      label: '选项二',
      value: '选项二'
    }],
    regList: [],
    changeTag: true,
    proCondition: false,
    asSummary: false
  },
]

export const inputComponents = [
  {
    label: '填空',
    dataType:'string',
    showLabel: true,
    tag: 'my-fill-blanks',
    tagIcon: 'input',
    placeholder: '请输入',
    defaultValue: undefined,
    span: 24,
    labelWidth: null,
    style: { width: '100%' },
    clearable: true,
    prepend: '',
    append: '',
    'prefix-icon': '',
    'suffix-icon': '',
    maxlength: null,
    'show-word-limit': false,
    readonly: false,
    disabled: false,
    required: true,
    regList: [],
    __slot__:{},
    changeTag: true,
    proCondition: false,
    asSummary: false
  },
]
// 容器组件
export const layoutComponents = [
  {
    label: '评价题',
    dataType:'number',
    showLabel: true,
    tag: 'el-rate',
    tagIcon: 'rate',
    defaultValue: 0,
    span: 24,
    labelWidth: null,
    style: {},
    max: 5,
    'allow-half': false,
    'show-text': false,
    'show-score': false,
    disabled: false,
    required: true,
    regList: [],
    changeTag: true,
    proCondition: false,
    asSummary: false
  },
  {
    label: '开放性问题',
    type:'textarea',
    showLabel: true,
    tag: 'el-input',
    tagIcon: 'textarea',
    dataType: 'string',
    placeholder: '请输入',
    defaultValue: undefined,
    span: 24,
    labelWidth: null,
    autosize: {
      minRows: 4,
      maxRows: 4
    },
    style: { width: '100%' },
    maxlength: null,
    'show-word-limit': false,
    readonly: false,
    disabled: false,
    required: true,
    regList: [],
    changeTag: true,
    proCondition: false,
    asSummary: false
  },
]

export const commonComponents = [...inputComponents, ...selectComponents, ...layoutComponents]
  .map( t => Object.assign( { cmpType: 'common' }, t ) )


// .map( t => Object.assign( { cmpType: 'custom', t } ) )
 
export default {

  inputComponents,selectComponents, layoutComponents
}